package com.squirrel.common.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description ResponseResult 响应结果集
 * @Author 关远键
 * @Version v1.0.0
 * @Date 2021/11/9 14:23
 */
@Data
@ApiModel("结果集")
public class ResponseResult<T> {
    @ApiModelProperty("状态码")
    private Integer code;
    @ApiModelProperty("响应消息")
    private String message;
    @ApiModelProperty("结果数据")
    private T data;

    public ResponseResult() {
    }

    public ResponseResult(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResponseResult{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
